/************************************************************************
* Programmer:  Philippe Gambling
*
* Course:  CSCI 4534
*
* Date:  March 10, 2009
*
* Assignment:  #2
*
* Environment:  GCC 3.2.2 running on diamond.rocks.uhcl.edu
*
* Files Included: None
*
* Purpose:  Defines a struct type that models a process control block,
*           including values for CPU burst, arrival, completion,
*           turnaround, and wait times.
*           The ClientFifoName specifies a private FIFO for the
*           server program to send data to the client.  
*           Pid specifies the process number.          
*
***********************************************************************/ 

#ifndef _PCB_H
#define _PCB_H

typedef struct
{
  char ClientFifoName[25]; // Name of private FIFO for server to client communication
  int Pid;                 // The process id
  int CpuBurst;            // CPU Burst time
  int ArrivalTime;         // Simulated arrival time
  int CompletionTime;      // Time process completes on server
  int WaitTime;            // Time process spent waiting in ready state
  int TurnaroundTime;      // Time process spent on server from arrival to completion
} PCB;

// Public functions and macros
static const PCB NEW_PCB = {"EMPTY",0,0,0,0,0,0}; // Proper initialization for a pcb struct

void PCB_Print(const PCB *); // Prints out the content of pcb.

#endif
